package com.uraurora.crescent.tuple;

import com.uraurora.crescent.util.SeiIterables;

public class Tuple5<T1, T2, T3, T4, T5> extends AbstractTuple implements ITuple {

    private final static int SIZE = 5;

    private Tuple5(Object[] values){
        super(values);
    }

    public static <T1, T2, T3, T4, T5> com.uraurora.crescent.tuple.Tuple5<T1, T2, T3, T4, T5> of(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5){
        Object[] objects = {t1, t2, t3, t4, t5};
        return new com.uraurora.crescent.tuple.Tuple5<>(objects);
    }

    static <T1, T2, T3, T4, T5> com.uraurora.crescent.tuple.Tuple5<T1, T2, T3, T4, T5> of(Iterable<?> iterable){
        Object[] obj = SeiIterables.toArray(iterable, SIZE);
        return new com.uraurora.crescent.tuple.Tuple5<>(obj);
    }

}
